package com.user.mock.handler;

import com.entity.user.Sex;
import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.MappedTypes;
import org.apache.ibatis.type.TypeHandler;
import org.springframework.stereotype.Component;

import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;


@Component
@MappedTypes(Sex.class)
public class SexHandler implements TypeHandler<Sex> {

    @Override
    public void setParameter(PreparedStatement ps, int i, Sex parameter, JdbcType jdbcType) throws SQLException {
        System.out.println(parameter);
    }

    @Override
    public Sex getResult(ResultSet rs, String columnName) throws SQLException {
        return null;
    }

    @Override
    public Sex getResult(ResultSet rs, int columnIndex) throws SQLException {
        return null;
    }

    @Override
    public Sex getResult(CallableStatement cs, int columnIndex) throws SQLException {
        return null;
    }
}
